<template>
	<ul class="flow-chart-list pT40">
		<li v-for="(row, index) in customerArray">
	    <span	 class="progress-spot" :class="{active:row.isActive}"></span>
	    <p class="ellipsis">{{row.name}}</p>
	   <!-- <p class="ellipsis">{{row.createTime}}</p>-->
    	</li>
	</ul>
</template>

<script>
	export default {
		props: ['modalShow'],
		data(){
			return {
				customerArray:[{name:'报备',isActive:false},{name:'带看',isActive:false},{name:'认筹',isActive:false},{name:'认购',isActive:false},{name:'签约',isActive:false},{name:'结佣',isActive:false}],
				currentStatus:''
			}
		},
		mounted:function(){
			//初始化			
			this.customerStatuList();
		},
		methods:{
			customerStatuList:function(){
				var _self = this;
				var url = this.utilHelper.apiUrl+'/customerPremises/findCustomerFollow.do';
				var initFlag = {
					flag:'-1',
					id:_self.$route.params.id
				};
				_self.$http.post(url,initFlag).then((response)=>{
					var obj = response.body.resData;
					if(obj.currentStatus){
						_self.currentStatus = obj.currentStatus;
					}
					for(var i=0;i<obj.index;i++){
						_self.customerArray[i].isActive=true;
					}
					_self.$emit("currentStatus",_self.currentStatus);
				});
				
			}
		}
		
	}
</script>